package com.jzo2o.customer.controller.operation;

import com.jzo2o.common.model.PageResult;
import com.jzo2o.customer.model.domain.AgencyCertificationAudit;
import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditPageQueryReqDTO;
import com.jzo2o.customer.service.AgencyCertficationAuditService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController("operationAgencyCertificationAuditController")
@RequestMapping("/operation/agency-certification-audit")
@Api(tags = "运营端 - 机构审核认证")
public class AgencyCertificationAuditController {
    @Autowired
    private AgencyCertficationAuditService agencyCertficationAuditService;

    @GetMapping(path = "/page")
    @ApiOperation("审核机构认证分页查询")
    public PageResult<AgencyCertificationAudit> queryPageAgency(AgencyCertificationAuditPageQueryReqDTO dto) {
        return agencyCertficationAuditService.queryPageAgency(dto);
    }

    @PutMapping(path = "/audit/{id}")
    @ApiOperation("审核机构认证信息")
    public void auditServicePersonnel(Integer certificationStatus, @PathVariable Long id, String rejectReason) {
        agencyCertficationAuditService.auditServicePersonnel(certificationStatus,id,rejectReason);
    }
}
